home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglsharpentexfuncsgis.z / fglsharpentexfuncsgis
Text File  |  1998-10-20  |  10KB  |  133 lines

  1.  
  2.  
  3.  
  4. ffffggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS((((3333GGGG))))      OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee      ffffggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS - specify sharpen texture scaling function
  10.  
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      SUBROUTINE ffffggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS( INTEGER*4 _t_a_r_g_e_t,
  14.                                        INTEGER*4 _n,
  15.                                        CHARACTER*8 _p_o_i_n_t_s )
  16.  
  17.  
  18. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  19.      _t_a_r_g_e_t  The target to which the scaling function will be applied.  Must
  20.              be one of GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____1111DDDD, GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____2222DDDD, or GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____3333DDDD____EEEEXXXXTTTT.
  21.  
  22.      _n       The number of scaling function samples in _p_o_i_n_t_s.
  23.  
  24.      _p_o_i_n_t_s  An array of scaling function samples, each of which is a (_l_e_v_e_l-
  25.              _o_f-_d_e_t_a_i_l, _f_u_n_c_t_i_o_n-_v_a_l_u_e) pair.
  26.  
  27. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  28.      The sharpen texture extension defines three additional texture
  29.      magnification filters.  These filters are selected by choosing one of the
  30.      values GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____SSSSGGGGIIIISSSS, GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____AAAALLLLPPPPHHHHAAAA____SSSSGGGGIIIISSSS, or
  31.      GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____CCCCOOOOLLLLOOOORRRR____SSSSGGGGIIIISSSS for the current 1D, 2D, or 3D texture's
  32.      GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____MMMMAAAAGGGG____FFFFIIIILLLLTTTTEEEERRRR.
  33.  
  34.      All three filters sample the level zero texture array exactly as it would
  35.      be sampled with filter mode GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR.  If both texture levels 0 and 1
  36.      are complete, the level 1 array of the texture is also linearly sampled,
  37.      just as though mipmap minification was being performed with _L_O_D (the
  38.      level of detail parameter) valued near 1.0.  If levels 0 and 1 are not
  39.      complete, it is as though the magnification texture filter was GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR.
  40.      (Although querying the magnification filter value will return the value
  41.      as specified.)
  42.  
  43.      The texture value computed from the level 0 array (_T_0) and the value
  44.      computed from the level one array (_T_1) are combined to compute the final
  45.      texture value (_T):
  46.  
  47.           T' = ((1 + F(LOD)) * T0) - (F(LOD) * T1)
  48.  
  49.           T =                               0  if T' < 0
  50.                                             T' if 0 <= T' <= 1
  51.                                             1  if T' > 1
  52.  
  53.  
  54.      ffffggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS is used to specify the scaling function _F.  _t_a_r_g_e_t
  55.      must be GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____1111DDDD, GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____2222DDDD, or GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____3333DDDD____EEEEXXXXTTTT.  _n specifies
  56.      the number of pairs of values in _p_o_i_n_t_s.  _p_o_i_n_t_s points to an array of
  57.      pairs of floating point values.  The first value of each pair specifies a
  58.      value of _L_O_D, and the second value of each pair specifies the
  59.      corresponding function value.  The order in which the points are
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS((((3333GGGG))))      OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee      ffffggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      specified is not significant.  The _n value pairs in _p_o_i_n_t_s completely
  75.      specify the function, replacing any previous specification that may have
  76.      existed.
  77.  
  78.      The function _F is evaluated by fitting a curve through the sample points
  79.      specified in _p_o_i_n_t_s.  This curve may be linear between adjacent points,
  80.      or it may be smoothed, but it will pass exactly through the points,
  81.      limited only by the resolution of the implementation.  The value pair
  82.      with the lowest _L_O_D value specifies the function value _F for all values
  83.      of _L_O_D less than or equal to that pair's _L_O_D.  Likewise, the value pair
  84.      with the greatest _L_O_D value specifies the function value _F for all values
  85.      of _L_O_D greater than or equal to that pair's _L_O_D.
  86.  
  87.      Since negative values of _L_O_D correspond to magnification and positive
  88.      values correspond to minification, the points should have negative _L_O_D
  89.      values (although specifying a positive value does not generate an error).
  90.      For example, an _L_O_D of -4 corresponds to a magnification by a factor of
  91.      2**4, or 16.  The default function points are (0,0) and (-4,1).
  92.  
  93.      If the texture magnification filter is GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____SSSSGGGGIIIISSSS, then both
  94.      the color and the alpha components of _T are computed as described in the
  95.      equations above.  If the filter is GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____CCCCOOOOLLLLOOOORRRR____SSSSGGGGIIIISSSS, then all
  96.      components of _T other than alpha are computed as described above, and the
  97.      alpha component of _T is computed as if the texture magnification filter
  98.      were GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR.  Finally, if the filter is GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR____SSSSHHHHAAAARRRRPPPPEEEENNNN____AAAALLLLPPPPHHHHAAAA____SSSSGGGGIIIISSSS,
  99.      the alpha component of _T is computed as described in the equations above,
  100.      and all other components of _T are computed as if the texture
  101.      magnification filter were GGGGLLLL____LLLLIIIINNNNEEEEAAAARRRR.
  102.  
  103. EEEERRRRRRRROOOORRRRSSSS
  104.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_a_r_g_e_t is not one of the allowable
  105.      values.
  106.  
  107.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _n is negative.
  108.  
  109.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS is executed
  110.      between the execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of
  111.      ffffggggllllEEEEnnnndddd.
  112.  
  113. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  114.      ffffggggllllGGGGeeeettttTTTTeeeexxxxPPPPaaaarrrraaaammmmeeeetttteeeerrrr, ffffggggllllGGGGeeeettttSSSShhhhaaaarrrrppppeeeennnnTTTTeeeexxxxFFFFuuuunnnnccccSSSSGGGGIIIISSSS.
  115.  
  116.  
  117. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  118.      On RealityEngine, RealityEngine2, and VTX systems sharpen texturing may
  119.      not be used with 3D textures or when rendering to pixmaps.
  120.  
  121.  
  122. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  123.      ffffggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee1111DDDD, ffffggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee2222DDDD, ffffggggllllTTTTeeeexxxxIIIImmmmaaaaggggeeee3333DDDDEEEEXXXXTTTT, ffffggggllllTTTTeeeexxxxPPPPaaaarrrraaaammmmeeeetttteeeerrrr,
  124.      ffffggggllllTTTTeeeexxxxSSSSuuuubbbbIIIImmmmaaaaggggeeee2222DDDDEEEEXXXXTTTT.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.